<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>登录密码</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="shortcut icon" href="__IMG__/favicon.ico" />
		<link rel="bookmark" href="__IMG__/favicon.ico" type="image/x-icon" 　/>
		<link rel="stylesheet" href="__CSS__/mui.min.css">
		<link rel="stylesheet" type="text/css" href="__CSS__/common.css"/>
		<script src="__JS__/mui.min.js"></script>
		<script type="text/javascript" charset="utf-8">
	      	mui.init();
       </script>
      <style type="text/css">
      	input[type=password]{
      		width: 60%;
      		margin: 0;
      		height: 30px;
      		border: none;
      	}
		.quit_a {
			width: 200px;
			height: 40px;
			display: inline-block;
			color: #FFFFFF;
			background: #15C0FE;
			border-radius: 15px;
			line-height: 40px;
			margin-top: 30px;
			margin-left: 80px;
		}

      </style>
	</head>
	<body>
		<header class="mui-bar mui-bar-nav">
		    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
		    <h1 class="mui-title">登录密码</h1>
		</header>
		<div class="mui-content bg_ff">
		     <div class="padding_10 bor_b">
		     	<label for="">原登录密码</label>
		     	<input type="password" name="password" id="old_pass" value="" placeholder="请输入原登录密码" />
		     </div>
		     <div class="padding_10 bor_b ">
		     	<label for="">新登录密码</label>
		     	<input type="password" name="old_password" id="new_pass1" value="" placeholder="请输入新登录密码"/>
		     </div>
		     <div class="padding_10 bor_b">
		     	<label for="">确认新密码</label>
		     	<input type="password" name="" id="new_pass2" value="" placeholder="请输入确认登录密码"/>
		     </div>
			<div class="padding_10 bor_b">
				<button id="check" class="quit_a"  >确认</button>
			</div>
		    
		</div>
		

	</body>
	<script src="__JS__/jquery-1.6.2.min.js" ></script>
    <script>
        $('#check').click(function(){
            var old_pass =   $('#old_pass').val();
            var new_pass1 = $('#new_pass1').val();
            var new_pass2  = $('#new_pass2').val();
            if(new_pass1!=new_pass2){
                alert('两次密码不一致');
				return false;
			}
            $.ajax({
                type: "post",
                url: "{:url('do_login_password')}",
                data: {
                    "old_pass": old_pass,
                    'new_pass1': new_pass1,
                    'new_pass2': new_pass2
                },
                dataType: "json",
                async: false,
                success: function(data) {
                    var ret = data.ret;
                    var info = data.msg;
                    if(ret=='200'){
                        alert('修改成功');
                        location.href = "{url('login/login')}"
					}else{
                        alert(info)
					}
                }
            });
        });
	</script>
	
</html>